<%@ page contentType="text/html; charset=utf-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>新增单证</title>
        <script type='text/javascript' src='${pageContext.request.contextPath}/dwr/interface/CountryDAO.js'></script>
        <script type='text/javascript' src='${pageContext.request.contextPath}/dwr/interface/ProductDAO.js'></script>
        <script type='text/javascript' src='${pageContext.request.contextPath}/dwr/interface/DocumentTypeDAO.js'></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/zcms/zDialog.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/zcms/zDrag.js"></script>
        <script type='text/javascript' src='${pageContext.request.contextPath}/dwr/engine.js'></script>
        <script type='text/javascript' src='${pageContext.request.contextPath}/dwr/util.js'></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/cont_diqu.js"></script>
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/css.css" />
        <script language="javascript" type="text/javascript" src="${pageContext.request.contextPath}/document/j.js" ></script>
        <link href="${pageContext.request.contextPath}/css/cont.css" rel="stylesheet" type="text/css"/>
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/zcms/jquery-1.6.1.min.js"></script>
        <script type="text/javascript">
            function getDAO()
            {
                CountryDAO.findAll(callbackcountry);
                ProductDAO.findAll(callbackproduct);
                DocumentTypeDAO.findAll(callbackgroup);
            }
            //            
            function callbackcountry(data){  
                dwr.util.removeAllOptions("country");
                dwr.util.addOptions("country",{'-1':'--请选择--'});
                dwr.util.addOptions("country",data,"id","name");  
                
                var a = "<s:property value="document.country.id" />";
       
                if (typeof(a) != "undefined") 
                {   
                   
                    dwr.util.setValue("country",a);  
                }  
                             
 
            }
            function callbackproduct(data){  //显示出紧急度
                dwr.util.removeAllOptions("products");
                dwr.util.addOptions("products",{'-1':'--请选择--'});
                dwr.util.addOptions("products",data,"id","name");  
              
                var a = "<s:property value="document.product.id" />";
      
                if (typeof(a) != "undefined") 
                {   
                   
                    dwr.util.setValue("products",a);  
                }  
            }
            function callbackgroup(data){  //显示出紧急度
                dwr.util.removeAllOptions("types");
                dwr.util.addOptions("types",{'-1':'--请选择--'});
                dwr.util.addOptions("types",data,"id","name");  
                var a = "<s:property value="document.documentType.id" />";
            
                if (typeof(a) != "undefined") 
                {   
                   
                    dwr.util.setValue("types",a);  
                }  
            }
            var fileInputNumber = 0;
            var fileName = "";
            function addFile()　　  	
            {	
                var strFile = "file"+fileInputNumber;
                var filePath = document.getElementById(strFile);


                document.getElementById(strFile).style.display = "none";
                var paths = filePath.value.split("\\");
                var name = paths[paths.length-1];
		
                fileName=fileName+"%"+name;
			
                document.getElementById("fileName").value=fileName;
	
                var str1 =
                    '<div style="background-color:#E7EBF7">'+
                    '<font size="2" style="width:300px">'+name+'</font>'+
                    '<a href="#"><img onclick="removeFile(this,'+strFile+')" src="../images/del2.gif" border="0" alt="删除附件"/></a>'+
                    '</div>';
                var _file = document.getElementById("_file");
			
                _file.insertAdjacentHTML("beforeend",str1);
                addInput();
            }
	
            function addInput(){
                fileInputNumber++;
                var strFile = "file"+fileInputNumber;
                var str2 = '<input name="file" id="'+strFile+'" type="file" value="添加附件" onchange="addFile()" />';
                var _input = document.getElementById("input");
                _input.insertAdjacentHTML("afterbegin",str2);
	
            }
        	
            function removeFile(id,strFile) {
                var new_tr = id.parentNode.parentNode;
                try {
                    //new_tr.removeNode(true);
                    // just ie , not w3c;
                    // other idea
                    var tmp = new_tr.parentNode;
                    // 为了在ie和firefox下都能正常使用,就要用另一个方法代替,最取上一层的父结点,然后remove.
                    tmp.removeChild(new_tr);		
                    removeInput(strFile);
                } catch(e) {}
            }
            function removeInput(strFile) {
                var _input = document.getElementById("input");
                try {
                    //new_tr.removeNode(true);
                    // just ie , not w3c;
                    // other idea
                    // 为了在ie和firefox下都能正常使用,就要用另一个方法代替,最取上一层的父结点,然后remove.
                    input.removeChild(strFile);
                } catch(e) {}
            }
            function sub(){
                return true;
            }
            function Chose(){
                var dellist=""
                var memberIds = document.getElementsByName('chose');
                var memberUsernames = document.getElementsByName('xxx');
                for (var i = 0;i<memberIds.length;i++) {
                    if (memberIds[i].checked) {
	    	
                        memberUsernames[i].style.display="";
                        dellist=memberIds[i].value+'%'+dellist;
	    	
                    }
                    else{
                        memberUsernames[i].style.display="none";
                    }
                }
	   
                document.getElementById('delstrings').value=dellist;
            }
            
            function del(acessoryId,documentId)
            {

                var msgs = "确认删除记录吗？";
                if (confirm(msgs) == true) {
                    window.location='del_acessory.action?document_id='+documentId+"&acessory_id="+acessoryId;
                    return true;
                } else {
                    return false;
                }
	
            }

        </script>
        <style>
            body,td,th{font-size:12px}
            .alllisttitle{ padding-left:10px}
            a:link,a:visited{ color:#000000; text-decoration:none}
            a:hover{ color:#ff0000; text-decoration:none}
            select{ background:#ffffff!important}
        </style>

        <script type="text/javascript">
            
            function nav5(id){
                document.getElementById('text5').innerHTML= document.getElementById(id).innerHTML
                document.getElementById('document.productName').value= document.getElementById(id).innerHTML;
                document.getElementById('document.product.id').value=id;
                $("#cplb_big").css("display","none");
            };
            
            
            $(document).ready(function(){
                $("#cplb_tab1").mouseover(function(){
                    $("#cplb_tab1").css("background","#D3E0F3");
                    $("#cplb_tab1").css("border-right","0");
                    $("#cplb_tab1").css("border-left","2px solid #F3BE18");
                    $("#cplb_tab1").css("border-top","2px solid #F3BE18");
                    $("#cplb_tab1").css("border-bottom","2px solid #F3BE18");
                    $("#cplb_nav1").css("display","block");
                    $("#cplb_nav2").css("display","none");
                    $("#cplb_nav3").css("display","none");
                    $("#cplb_tab2").css("background","#EAF1F7");
                    $("#cplb_tab2").css("border-top","0");
                    $("#cplb_tab2").css("border-right","2px solid #F3BE18");
                    $("#cplb_tab2").css("border-bottom","1px dotted #96A6BD");
                    $("#cplb_tab3").css("background","#EAF1F7");
                    $("#cplb_tab3").css("border-right","2px solid #F3BE18");
                    $("#cplb_tab3").css("border-bottom","1px dotted #96A6BD");
                    $("#cplb_tab3").css("border-top","0");
                });

                $("#cplb_tab2").mouseover(function(){
                    $("#cplb_tab2").css("background","#D3E0F3");
                    $("#cplb_tab2").css("border-right","0");
                    $("#cplb_tab2").css("border-left","2px solid #F3BE18");
                    $("#cplb_tab2").css("border-top","2px solid #F3BE18");
                    $("#cplb_tab2").css("border-bottom","2px solid #F3BE18");
                    $("#cplb_nav2").css("display","block");
                    $("#cplb_nav1").css("display","none");
                    $("#cplb_nav3").css("display","none");
                    $("#cplb_tab1").css("background","#EAF1F7");
                    $("#cplb_tab1").css("border-top","0");
                    $("#cplb_tab1").css("border-right","2px solid #F3BE18");
                    $("#cplb_tab1").css("border-bottom","1px dotted #96A6BD");
                    $("#cplb_tab3").css("background","#EAF1F7");
                    $("#cplb_tab3").css("border-right","2px solid #F3BE18");
                    $("#cplb_tab3").css("border-bottom","1px dotted #96A6BD");
                    $("#cplb_tab3").css("border-top","0");
                });

                $("#cplb_tab3").mouseover(function(){
                    $("#cplb_tab3").css("background","#D3E0F3");
                    $("#cplb_tab3").css("border-right","0");
                    $("#cplb_tab3").css("border-left","2px solid #F3BE18");
                    $("#cplb_tab3").css("border-top","2px solid #F3BE18");
                    $("#cplb_tab3").css("border-bottom","2px solid #F3BE18");
                    $("#cplb_nav3").css("display","block");
                    $("#cplb_nav1").css("display","none");
                    $("#cplb_nav2").css("display","none");
                    $("#cplb_tab2").css("background","#EAF1F7");
                    $("#cplb_tab2").css("border-top","0");
                    $("#cplb_tab2").css("border-right","2px solid #F3BE18");
                    $("#cplb_tab2").css("border-bottom","1px dotted #96A6BD");
                    $("#cplb_tab1").css("background","#EAF1F7");
                    $("#cplb_tab1").css("border-right","2px solid #F3BE18");
                    $("#cplb_tab1").css("border-bottom","1px dotted #96A6BD");
                    $("#cplb_tab1").css("border-top","0");
                });

                $("#cplb_eav").mouseover(function(){
                    $("#cplb_big").css("display","block");
                });
                $("#cplb_eav").mouseout(function(){
                    $("#cplb_big").css("display","none");
                });
                $("#cplb_big").mouseover(function(){
                    $("#cplb_big").css("display","block");
                });
                $("#cplb_big").mouseout(function(){
                    $("#cplb_big").css("display","none");
                });
            });
        </script>
        <style>
            body,td,th{font-size:12px}
            .alllisttitle{ padding-left:10px}
            a:link,a:visited{ color:#000000; text-decoration:none}
            a:hover{ color:#ff0000; text-decoration:none}
            select{ background:#ffffff!important}
        </style>
        <!--国家js开始-->
        <script type="text/javascript">
            var menuids=["suckertree"]

            function buildsubmenus(){
                for (var i=0; i<menuids.length; i++){
                    var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
                    for (var t=0; t<ultags.length; t++){
                        ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
                        ultags[t].parentNode.onmouseover=function(){
                            this.getElementsByTagName("ul")[0].style.display="block"
                        }
                        ultags[t].parentNode.onmouseout=function(){
                            this.getElementsByTagName("ul")[0].style.display="none"
                        }
                    }
                }
            }

            if (window.addEventListener)
                window.addEventListener("load", buildsubmenus, false)
            else if (window.attachEvent)
                window.attachEvent("onload", buildsubmenus)
        </script>
        <script type="text/javascript">
            function nav(id){
               
                if(document.getElementById(id).innerHTML=="所有(清空条件)"){
                    document.getElementById('text').innerHTML="";
                    document.getElementById('document.country.id').value=-1;
                    document.getElementById('document.countryName').value="";
                    $(".suckertree_ul").css("display","none");
                }
                else{
                    document.getElementById('text').innerHTML= document.getElementById(id).innerHTML;
                 
                    document.getElementById('document.country.id').value=id.substring(1);
                    document.getElementById('document.countryName').value=document.getElementById(id).innerHTML;
                    $(".suckertree_ul").css("display","none");
                }
            };
        </script>
        <!--国家js结束-->

        <style type="text/css"> 
            *{ padding:0; margin:0; list-style-type:none;} 
            body{font-family: "宋体";font-size: 12px;} 
            #t_con1{ float:left;width:80px; line-height:25px; height:25px;color:#00F; cursor:pointer;border:1px #cccccc solid; text-align:center;} 
            #t_area1{ position:absolute;width:528px; overflow:hidden; border:3px #AAADA8 solid; background-color:#ffffff; top:25px; left:-452px;padding-bottom:10px;display:none; } 
            #t_area1 ul{} 
            #t_area1 li{ width:60px; height:25px; float:left; display:inline;  text-align:left!important; line-height:25px; margin:4px auto auto 5px; } 
            #t_area1 li a:link,#t_area1 li a:visited{ color:#444444; text-decoration:none; text-align:left!important} 
            #t_area1 li a:hover{ color:#ff0000; text-decoration:none; text-align:left!important} 

            #t_con2{ float:left;width:100px; line-height:25px; height:25px;color:#00F; cursor:pointer;border:1px #cccccc solid; text-align:center;} 
            #t_area2{ position:absolute;width:268px; overflow:hidden; border:2px #cccccc solid; background-color:#ffffff; top:20px; left:0;padding-bottom:10px;display:none; } 
            #t_area2 ul{} 
            #t_area2 li{ width:60px; height:18px; float:left; display:inline; text-align:center; line-height:25px; margin:4px auto auto 5px; } 
            #t_area2 li a:link,#t_area2 li a:visited{ color:#444444;text-decoration:none;} 
            #t_area2 li a:hover{ color:#ff0000; text-decoration:none;} 
        </style>
        <!--单证类别js开始-->
        <script type="text/javascript">
            //        var menuids2=["suckertree2"]
            //
            //        function buildsubmenus2(){
            //            for (var i=0; i<menuids2.length; i++){
            //                var ultags2=document.getElementById(menuids2[i]).getElementsByTagName("ul")
            //                for (var t=0; t<ultags2.length; t++){
            //                    ultags2[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
            //                    ultags2[t].parentNode.onmouseover=function(){
            //                        this.getElementsByTagName("ul")[0].style.display="block"
            //                    }
            //                    ultags2[t].parentNode.onmouseout=function(){
            //                        this.getElementsByTagName("ul")[0].style.display="none"
            //                    }
            //                }
            //            }
            //        }
            //
            //        if (window.addEventListener)
            //            window.addEventListener("load", buildsubmenus2, false)
            //        else if (window.attachEvent)
            //            window.attachEvent("onload", buildsubmenus2)
        </script>
        <script type="text/javascript">
            function nav2(id){
              
                if(document.getElementById(id).innerHTML=="所有(清空条件)"){
                    document.getElementById('text2').innerHTML="";
                    document.getElementById('document.documentType.id').innerHTML=-1;
                }
                else{
                    document.getElementById('text2').innerHTML= document.getElementById(id).innerHTML;
                    document.getElementById('document.documentType.id').value=id;
                    document.getElementById('document.productName').value= document.getElementById(id).innerHTML;
                }
            };
            
            
            function showarea1(){ 
                var con = document.getElementById("t_area1"); 
                var arealist = con.getElementsByTagName("li"); 
                var g = document.getElementById("t_con1") 
                con.style.display = "block"; 
                for (var i=0;i<arealist.length;i++){ 
                    arealist[i].onclick = function(){ 
                      
                        if(this.innerText=="所有(清空条件)")
                        {
                            document.getElementById("t_con1").innerText="";
                            document.getElementById('document.documentType.id').value=-1;
                            document.getElementById('document.typeName').value="";
                      
                        }else
                        { 
                        
                            g.innerText = this.innerText ; 
                       
                            document.getElementById('document.typeName').value=this.innerText;
                            document.getElementById('document.documentType.id').value=this.id;
                        }
                       
                        con.style.display = "none"; 
                    } 
                } 
            } 
            function offarea1(){ 
                var con = document.getElementById("t_area1"); 
                con.style.display = "none"; 
            } 
            var timer1; 
        </script>
        <!--单证类别js结束-->
    </head>

    <body onload="getDAO()">

        <s:form id="form" name="form" action="%{actionURI}.action" method="post" theme="simple" ENCTYPE="multipart/form-data">

            <s:hidden id="fileName" name="fileName"></s:hidden>
            <s:hidden id="delstrings" name="delstrings"></s:hidden>
            <s:hidden id="document.country.id" name="document.country.id" />
            <s:hidden id="document.countryName" name="document.countryName" />
            <s:hidden id="document.product.id" name="document.product.id"  />
            <s:hidden id="document.productName" name="document.productName" />
            <s:hidden id="document.documentType.id" name="document.documentType.id"  value="-1" />
            <s:hidden id="document.typeName" name="document.typeName" />
            <s:if test="actionURI=='save'">
                <table width="80%" height="" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#b5d6e6">

                    <tr height="28">
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>单证格式编码:</b>					</td>
                        <td width="80%" bgcolor="#FFFFFF">
                            <s:textfield id="document.code" name="document.code" cssStyle="width: 60%"/>	

                        </td>
                    </tr>              
                    <tr height="28">
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>单证格式名称:</b>					</td>
                        <td width="80%" bgcolor="#FFFFFF">
                            <s:textfield id="document.name" name="document.name" cssStyle="width: 60%"/>	

                        </td>
                    </tr>          

                    <tr>
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>所属单证类型:</b>
                        </td>
                        <td width="80%" bgcolor="#FFFFFF" style="position:relative">
                            <div style="position:relative; float:left; width:90px; height:25px; margin-top:3px; background:#ffffff">
                                <div id="t_con1" style="background:url(../images/jiansuo_bg.jpg) no-repeat right;color:#444444; height:23px;width:90px; line-height:23px" onMouseOver="showarea1();clearTimeout(timer1)" onMouseOut="timer1=setTimeout('offarea1()',200);">${document.typeName}</div> 
                                <div id="t_area1" onMouseOver="showarea1()" onMouseOut="offarea1();clearTimeout(timer1)" style="left:-200px;top:25px; width:800px; z-index:10000"> 
                                    <ul> 
                                        <li style="height:auto;width:528px"><a href="#">所有(清空条件)</a></li> 

                                    </ul> 
                                    <s:iterator value="typeList" var="t" status="u">
                                        <ul> 
                                            <li style="height:auto" id="${t.id}"><a href="#">${t.name}</a></li> 

                                        </ul> 
                                    </s:iterator>
                                </div> 
                            </div>
                         
                        </td>
                    </tr>
                    <tr>
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>适用产品:</b>
                        </td>
                        <td width="80%" bgcolor="#FFFFFF" >
                            <div style="float:left; width:90px; height:24px; border:1px solid #cccccc; background:#ffffff; position:relative" id="cplb_eav"><span style=" float:left;width:80px; height:24px; background:url(../images/jiansuo_bg.jpg) no-repeat right; padding:0 7px 0 3px;cursor:hand;" id="text5">${document.productName}</span>
                            <table width="700" style="border:1px solid #ADCAF2;display:none; position:absolute; background:#ffffff;top:0;left:90px;" cellpadding="0" cellspacing="0" id="cplb_big">
                                <tr>
                                    <td valign="top" style="border-right:1px solid #F2BC14;width:35px"><table border="0" cellpadding="0" cellspacing="0" style="width:35px; margin-right:-6px">
                                            <s:iterator value="proList" var="p" status="u">
                                                <tr>
                                                    <td height="80px" class="cplb_tab_link" id="cplb_tab${u.index+1}">${p.name}</td>
                                                </tr>
                                            </s:iterator>

                                        </table>
                                    </td>
                                    <td width="965" valign="top" class="cplb_td"><!--工业品-->
                                        <s:iterator value="proList" var="p" status="u">

                                            <s:if test="#u.first" >
                                                <table width="100%" border="0" cellspacing="15" cellpadding="0" class="cplb_table" id="cplb_nav${u.index+1}">
                                                </s:if>
                                                <s:else>
                                                    <table width="100%" border="0" cellspacing="15" cellpadding="0" class="cplb_table" id="cplb_nav${u.index+1}" style="display:none">
                                                    </s:else>
                                                    <s:iterator value="#p.produceObjlist" var="p1" status="p3">
                                                        <tr> 
                                                            <td width="33%">
                                                                <table width="100%" border="0" cellspacing="0" cellpadding="0" style=" background:url(images/cplb_bg.jpg) repeat-x top">
                                                                    <tr>
                                                                        <td style="padding:0 5px 0 5px;"><strong><a href="#" id="${p1.id}" onClick="nav5('${p1.id}')">${p1.name}</a></strong></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td style="padding:0 5px 0 5px;">
                                                                            <s:iterator value="#p1.produceObjlist" var="p2" status="p2sta">
                                                                                <a href="#" id="${p2.id}" onClick="nav5('${p2.id}')">${p2.name}</a><s:if test="#p2sta.last"> </s:if>
                                                                                <s:else>|</s:else> 
                                                                            </s:iterator>
                                                                        </td>  
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>  </s:iterator>
                                                    </table>

                                            </s:iterator>

                                    </td>
                                </tr>
                            </table>
							</div>
                        </td>
                    </tr>

                    <tr>
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>采购国:</b>
                        </td>
                        <td width="80%" bgcolor="#FFFFFF">
                            <!--国家开始-->
                            <div class="suckerdiv">
                                <ul id="suckertree">
                                    <li class="suckerdiv_li"><a href="#" id="text" style=" padding-left:5px; width:85px; height:24px; border:1px solid #cccccc;  "><s:property value="document.countryName"/></a>
                                        <ul class="suckertree_ul" style=";z-index:0">
                                            <li class="suckertree_ul_li" style="z-index:9999;width:398px;"><a href="#" style="z-index:9999;width:398px;" id="font9999" onClick="nav('font9999')">所有(清空条件)</a>
                                                <s:iterator value="clist" var="c" status="u">
                                                    <li class="suckertree_ul_li" style="z-index:-${u.index}"><a href="#" style="z-index:-${u.index}" id="c${c.id}" onClick="nav('c${c.id}')">${c.name}</a>
                                                        <s:if test="#c.list!=null">
                                                            <ul>
                                                                <s:iterator value="#c.list" var="c2" status="uu">
                                                                    <li><a href="#" id="c${c2.id}" onClick="nav('c${c2.id}')">${c2.name}</a></li>
                                                                </s:iterator>


                                                            </ul> 
                                                        </s:if>
                                                    </li>
                                                </s:iterator>

                                        </ul>
                                    </li>
                                </ul>
                            </div>
                            <!--国家结束-->
                        </td>
                    </tr>
                    <tr>
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>作用和说明:</b></td>
                        <td width="80%" bgcolor="#FFFFFF">
                            <textarea id="document.feature" name="document.feature" rows="3" style="width: 90%"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>重要制作规定:</b>
                        </td>
                        <td width="80%" bgcolor="#FFFFFF">
                            <textarea id="document.useful" name="document.useful" rows="3" style="width: 90%"></textarea>
                        </td>
                    </tr>

                    <tr>
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>常识和经验:</b>
                        </td>
                        <td width="80%" bgcolor="#FFFFFF">
                            <textarea id="document.experience" name="document.experience" rows="3" style="width: 90%"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>上传附件：</b>
                        </td>
                        <td width="80%" bgcolor="#FFFFFF">
                            <table width="97%" border="1" cellspacing="0" cellpadding="0"  style="border:#C3BFB3 1px solid; border-collapse: collapse; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; background-color:#FFF" class="zcxx_tab3">
                                <tr>
                                    <td height="20" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="4">
                                            <tr>
                                                <td valign="top" height="100" colspan="2"><div id="_file"></div>
                                                    <br/></td>
                                            </tr>
                                            <tr>

                                                <td width="99%" bgcolor="#EBF4F5" style="padding-top: 1px; padding-bottom: 2px"  class="zc_add"><div id="input">
                                                        <input name="file" id="file0" type="file" value="添加附件" onChange="addFile()" />
                                                        <font class="zc_add">如果添加多个附件，请继续点击“浏览”</font> </div></td>
                                            </tr>
                                        </table></td>
                                </tr>
                            </table></td>
                    </tr>
                </table>
            </s:if>
            <s:else>
                <s:hidden id="document.id" name="document.id"></s:hidden>

                    <table width="80%" height="" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#b5d6e6">

                        <tr height="28">
                            <td width="20%" align="right" bgcolor="#deebf1">
                                <b>单证格式编码:</b>					</td>
                            <td width="80%" bgcolor="#FFFFFF">
                            <s:property value="document.code"/>	

                        </td>
                    </tr>              
                    <tr height="28">
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>单证格式名称:</b>					</td>
                        <td width="80%" bgcolor="#FFFFFF">
                            <input type="text" id="document.name" name="document.name" value="<s:property value="document.name"/>" />	
                        </td>
                    </tr>          

                    <tr>
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>所属单证类型:</b>
                        </td>
                        <td width="80%" bgcolor="#FFFFFF">
                                                    <div style="position:relative; float:left; width:80px; height:25px; margin-top:3px; background:#ffffff">
                                <div id="t_con1" style="background:url(../images/jiansuo_bg.jpg) no-repeat right;color:#444444; height:23px; line-height:23px" onMouseOver="showarea1();clearTimeout(timer1)" onMouseOut="timer1=setTimeout('offarea1()',200);">${document.typeName}</div> 
                                <div id="t_area1" onMouseOver="showarea1()" onMouseOut="offarea1();clearTimeout(timer1)" style=" z-index:10000; left:0px; top:25px; width:700px;"> 
                                    <ul> 
                                        <li style="height:auto;width:528px"><a href="#">所有(清空条件)</a></li> 

                                    </ul> 
                                    <s:iterator value="typeList" var="t" status="u">
                                        <ul> 
                                            <li style="height:auto" id="${t.id}"><a href="#">${t.name}</a></li> 

                                        </ul> 
                                    </s:iterator>
                                </div> 
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>适用产品:</b>
                        </td>
                        <td width="80%" bgcolor="#FFFFFF" style="position:relative">
                          <div style="float:left; width:80px; height:24px; border:1px solid #cccccc; background:#ffffff" id="cplb_eav"><span style=" float:left;width:70px; height:24px; background:url(../images/jiansuo_bg.jpg) no-repeat right; padding:0 7px 0 3px;cursor:hand;" id="text5">${document.productName}</span></div>
                            <table width="1003" style="border:1px solid #ADCAF2;display:none; position:absolute; background:#ffffff;top:26px;left:-200px; z-index:10000" cellpadding="0" cellspacing="0" id="cplb_big">
                                <tr>
                                    <td valign="top" style="border-right:1px solid #F2BC14; width:35px"><table border="0" cellpadding="0" cellspacing="0" style="width:35px; margin-right:-6px">
                                            <s:iterator value="proList" var="p" status="u">
                                                <tr>
                                                    <td height="80px" class="cplb_tab_link" id="cplb_tab${u.index+1}">${p.name}</td>
                                                </tr>
                                            </s:iterator>

                                        </table>
                                    </td>
                                    <td width="965" valign="top" class="cplb_td"><!--工业品-->
                                        <s:iterator value="proList" var="p" status="u">

                                            <s:if test="#u.first" >
                                                <table width="100%" border="0" cellspacing="15" cellpadding="0" class="cplb_table" id="cplb_nav${u.index+1}">
                                                </s:if>
                                                <s:else>
                                                    <table width="100%" border="0" cellspacing="15" cellpadding="0" class="cplb_table" id="cplb_nav${u.index+1}" style="display:none">
                                                    </s:else>
                                                    <s:iterator value="#p.produceObjlist" var="p1" status="p3">
                                                        <tr> 
                                                            <td width="33%">
                                                                <table width="100%" border="0" cellspacing="0" cellpadding="0" style=" background:url(images/cplb_bg.jpg) repeat-x top">
                                                                    <tr>
                                                                        <td style="padding:0 5px 0 5px;"><strong><a href="#" id="${p1.id}" onClick="nav5('${p1.id}')">${p1.name}</a></strong></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td style="padding:0 5px 0 5px;">
                                                                            <s:iterator value="#p1.produceObjlist" var="p2" status="p2sta">
                                                                                <a href="#" id="${p2.id}" onClick="nav5('${p2.id}')">${p2.name}</a><s:if test="#p2sta.last"> </s:if>
                                                                                <s:else>|</s:else> 
                                                                            </s:iterator>
                                                                        </td>  
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>  </s:iterator>
                                                    </table>

                                            </s:iterator>

                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                    <tr>
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>采购国:</b>
                        </td>
                        <td width="80%" bgcolor="#FFFFFF">
                            <!--国家开始-->
                            <div class="suckerdiv">
                                <ul id="suckertree">
                                    <li class="suckerdiv_li"><a href="#" id="text" style=" padding-left:5px; border:1px solid #cccccc"><s:property value="document.countryName"/></a>
                                        <ul class="suckertree_ul" style=";z-index:0">
                                            <li class="suckertree_ul_li" style="z-index:9999;width:398px;"><a href="#" style="z-index:9999;width:398px;" id="font9999" onClick="nav('font9999')">所有(清空条件)</a>
                                                <s:iterator value="clist" var="c" status="u">
                                                    <li class="suckertree_ul_li" style="z-index:-${u.index}"><a href="#" style="z-index:-${u.index}" id="c${c.id}" onClick="nav('c${c.id}')">${c.name}</a>
                                                        <s:if test="#c.list!=null">
                                                            <ul>
                                                                <s:iterator value="#c.list" var="c2" status="uu">
                                                                    <li><a href="#" id="c${c2.id}" onClick="nav('c${c2.id}')">${c2.name}</a></li>
                                                                </s:iterator>


                                                            </ul> 
                                                        </s:if>
                                                    </li>
                                                </s:iterator>

                                        </ul>
                                    </li>
                                </ul>
                            </div>
                            <!--国家结束-->
                        </td>
                    </tr>
                    <tr>
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>作用和说明:</b></td>
                        <td width="80%" bgcolor="#FFFFFF">
                            <textarea id="document.feature" name="document.feature"  rows="5" style="width: 90%"><s:property value="document.feature"/>
                            </textarea>
                        </td>
                    </tr>
                    <tr>
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>重要制作规定:</b>
                        </td>
                        <td width="80%" bgcolor="#FFFFFF">
                            <textarea id="document.useful" name="document.useful"  rows="5" style="width: 90%"><s:property value="document.useful"/>
                            </textarea>
                        </td>
                    </tr>

                    <tr>
                        <td width="20%" align="right" bgcolor="#deebf1">
                            <b>常识和经验:</b>
                        </td>
                        <td width="80%" bgcolor="#FFFFFF">
                            <textarea id="document.experience" name="document.experience" rows="5" style="width: 90%">${document.experience}
                            </textarea>
                        </td>
                    </tr>
                    <tr>
                        <td width="13%" height="5%" align="right" valign="middle"
                            bgcolor="#deebf1">
                            附件：
                        </td>
                        <td class="td-right-s" bgcolor="#EBF4F5" colspan="5">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td colspan="2">
                                        <div id="input1" align="right">
                                            <s:iterator value="accessoryList" var="accesory">
                                                <tr>
                                                    <input name="chose" type="checkbox"
                                                           value="<s:property value='id'></s:property>"
                                                               style="border: 0px" onClick="{Chose(this.value)}">
                                                               <a
                                                                   href="down.action?dlFileName=<s:property value='name'></s:property>">
                                                               <s:property value="truename" /> </a>

                                                           <img src="../images/del.gif"
                                                                <%-- onclick="javascript:return del(${id},${dc.id})" 单击删除附件  --%>
                                                                style="display: none"
                                                                name="xxx">
                                                               </tr>
                                                           </s:iterator>

                                                           </div>
                                                           </td>
                                                           </tr>
                                                           </table>

                                                           </td>
                                                           </tr>
                                                           <tr>
                                                               <td width="20%" align="right" bgcolor="#deebf1">
                                                                   <b>上传附件：</b>
                                                               </td>
                                                               <td width="80%" bgcolor="#FFFFFF">
                                                                   <table width="97%" border="1" cellspacing="0" cellpadding="0"  style="border:#C3BFB3 1px solid; border-collapse: collapse; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; background-color:#FFF" class="zcxx_tab3">
                                                                       <tr>
                                                                           <td height="20" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="4">
                                                                                   <tr>
                                                                                       <td valign="top" height="100" colspan="2"><div id="_file"></div>
                                                                                           <br/></td>
                                                                                   </tr>
                                                                                   <tr>

                                                                                       <td width="99%" bgcolor="#EBF4F5" style="padding-top: 1px; padding-bottom: 2px"  class="zc_add"><div id="input">
                                                                                               <input name="file" id="file0" type="file" value="添加附件" onChange="addFile()" />
                                                                                               <font class="zc_add">如果添加多个附件，请继续点击“浏览”</font> </div></td>
                                                                                   </tr>
                                                                               </table>
                                                                           </td>
                                                                       </tr>
                                                                   </table>
                                                               </td>
                                                           </tr>
                                                           </table>       

                                                    </s:else>
                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0"
                                                           height="8%">
                                                        <tr align="center" bgcolor="white">
														<td style="width:500px"></td>
                                                            <td align="center" height="12" style="padding-top: 5px">
                                                                <input class="mmBtn"  type="submit" value="保存" style="width:80px; text-align:center"/>
                                                                &nbsp;
                                                                <input name="button" type="button" class="mmBtn"
                                                                       onClick="window.location='list.action?parentId=${pid}&flag=${flag}'" value="返回" style="width:80px; text-align:center"/>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </s:form>
                                                </body>
                                                </html>